package function;

public class Variable extends Function {

	private char variable;

	public Variable() {
		variable = 'x';
	}

	public char getVariable() {
		return variable;
	}

	public void setVariable(char variable) {
		this.variable = variable;
	}

	public double evaluate(double x) {
		return x;
	}

	public Function differentiate() {
		return new Constant(1);
	}

	public String toString() {
		return variable + "";
	}
}
